import Vue from "vue";
import Router from "vue-router";
import routes from '@/common/config/routes'
Vue.use(Router);

// 解决路由错误 捕获异常
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}

export default new Router({
  routes
});
